/*
 * GUIObjectFactory.h
 *
 *  Created on: 09/11/2009
 *      Author: marcos
 */

#ifndef GUIOBJECTFACTORY_H_
#define GUIOBJECTFACTORY_H_

#include "map/Intersection.h"
#include "map/MapLocation.h"
#include "map/MapPoint.h"
#include "map/RoadSegment.h"
#include "map/car/Car.h"
#include "gui/objects/GUIObject.h"

class CarController;

namespace gui {

class GUICar;

class GUIObjectFactory {
public:
	GUIObjectFactory(GUIObjectDrawer* drawer);
	virtual ~GUIObjectFactory();
	virtual GUIObject* createGUIMapLocation(MapLocation* mapLocation);
	virtual GUIObject* createGUIBaseSegment(RoadSegment* roadSegment);
	virtual GUIObject* createGUIRoadSegment(RoadSegment* roadSegment);
	virtual GUIObject* createGUIRoadArrow(RoadSegment* roadSegment, bool inverted);
	virtual GUIObject* createGUIRouteSegment(MapPoint origin, MapPoint destination);
	virtual GUIObject* createGUIRouteArrow(MapPoint origin, MapPoint destination);
	virtual GUIObject* createGUIIntersection(MapPoint intersection, RoadType type);
	virtual GUIObject* createGUIRouteIntersection(MapPoint intersection);
	virtual GUICar* createGUICar(map::Car* car);
private:
	GUIObjectDrawer* drawer;
};

}

#include "gui/objects/GUICar.h"
#include "map/controllers/CarController.h"

#endif /* GUIOBJECTFACTORY_H_ */
